﻿<UserControl
    x:Class="CodeShow.CS.Shared.StaticBindingDemo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CodeShow.CS.Shared"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400"
    RequestedTheme="LIght">
    
    <UserControl.Resources>
        <local:BindingProperties x:Key="dataSource" />
    </UserControl.Resources>
    <UserControl.DataContext>
        <Binding Source="{StaticResource dataSource}" />
    </UserControl.DataContext>
    <Grid>
        <StackPanel
            VerticalAlignment="Top"
            HorizontalAlignment="Center">
            <TextBlock 
                FontSize="40" 
                Text="{Binding TextBlockText}"/>
            <Button
                Height="60"
                Width="160"
                Content="Toggle Text"
                FontSize="24"
                Margin="0,20,0,0"
                HorizontalAlignment="Center"
                Tapped="Button_Tapped"/>
        </StackPanel>
    </Grid>
</UserControl>
